// TIFFImageReader.cpp : Defines the entry point for the console application.
//
#include <opencv/cv.h>
#include <opencv/highgui.h>

#include "GeoTiffReader.hxx"
#include "GeoTiffImage.hxx"

int main(int argc, char** argv)
{
	if (argc < 3)
	{
		printf("Usage:\n\t%s input.tiff outputdir\n", argv[0]);
		return -1;
	}

	std::string inputFileName = argv[1];
	std::string outputDir = argv[2];

	GeoTiffImage image;
	GeoTiffReader reader;

	reader.setGeoTiffFileName(inputFileName.c_str());

	reader.setGeoTiffImage(&image);

	reader.readImage();

	image.splitImage(outputDir.c_str());

	cvWaitKey(0);

    return 0;
}

